<div id="main_container">
	{$oZoneHeader}
    <div class="main_content">
        {$oZoneTopMenu}
        <div class="center_content">  
            <div class="left_content">
                {$oZoneLeftMenu}
                {$oZoneGammeLeft}
            </div>
    
        <div class="right_content">
                <form id="createForm" class="Gmodeles" action="{jurl 'essais~BoGamme:save'}" method="POST">
            
                <h2>{$oEssai->ess_zSousTitre}</h2> 
                  
                  <dl>
                    <dt><label>Titre : </label></dt>
                    <dd>
                     <select name="type" validation="required" id="chap-title-list">
                            {foreach $chapitreTitre as $item}
                                {if $item->chap_name_id == $item->chap_name_id} 
                                      {assign $selected='selected="selected"'}
                                 {else}
                                      {assign $selected=''}
                                {/if}
                               <option value="{$item->chap_name_id} " {$selected} >{$item->chap_name}</option>
                            {/foreach}
                        <option value="autre">Autre</option>
                    </select>
                    </dd>
                    <dd style="margin-left:15px">
                        <input type="text" style="display:none;" name="chap-autre" value="" id="chap-autre" />
                    </dd>
                        {literal}
                            <script type="text/javascript">
                                $(function () {
                                    $('#chap-title-list').change(function () {
                                        if ($(this).val() == 'autre')
                                        {
                                            $('#chap-autre').show();
                                        }
                                        else
                                        {
                                            $('#chap-autre').hide();
                                        }
                                    });
                                });
                            </script>
                        {/literal}
                  </dl>

                  <dl style="height:auto">
                    <dt><label>Texte : </label></dt>
                    <dd style="width:600px;">
                        <textarea id="ess_zChapeau" name="ess_zChapeau" >{$oEssai->ess_zChapeau}</textarea>
                        <script type="text/javascript">
                            {literal}CKEDITOR.replace( 'ess_zChapeau', {width:'600px', toolbar:'AOToolbar'}) ;{/literal}
                        </script>
                    </dd>
                  </dl>

                  <dl style="height:auto">
                    <dt><label>Illustrations stockées  : </label></dt>
                    <dd><input type="text" id="ess_zImage"  name="ess_zImage" value="{$oEssai->ess_zImage}" readonly="readonly" style="width:300px;cursor:pointer" />
                        <input type="button" id="btnParcourir" value="Parcourir ..." />
                        <input type="hidden" value="{$path_img}" id="path_img" />

                        <script type="text/javascript">
                            {literal}
                            function openKCFinder(field) {
                                window.KCFinder = {
                                    callBack: function(url) {
                                        window.KCFinder = null;
                                        // field.value = url;
                                        field.val(url) ;
                                    }
                                };
                                img_path = $("#path_img").val();
                                window.open(j_basepath+'kcfinder/browse.php?type=images&dir='+img_path, 'kcfinder_textbox',
                                    'status=0, toolbar=0, location=0, menubar=0, directories=0, ' +
                                    'resizable=1, scrollbars=0, width=800, height=600'
                                );
                            }
                            $(function(){
                                $('#btnParcourir').click(function(){
                                    var cible = $(this).prev('input');
                                    openKCFinder (cible) ;
                                });
                            });
                            {/literal}
                        </script>
                    </dd>
                  </dl>
                  
                 

                 <dl class="submit">
                   <input class="valider" title="Valider" type="submit" value="" />
                   <a title="Annuler" href="{jurl 'essais~BoGamme:index', array('iTypeId'=>$iTypeId), false}" class="bt_green" ><span class="bt_green_lft"></span><strong>Annuler</strong><span class="bt_green_r"></span></a>
                 </dl>  

            </form>
                               </div><!-- end of right content-->

             
        </div>   <!--end of center content -->               

        <div class="clear"></div>
    </div> <!--end of main content-->
	
    
    <div class="footer">
    </div>

</div>		
